var express = require('express');
var router = express.Router();
var mysql = require('mysql');
var bodyParser = require("body-parser");
var config = require("../config.json");
var pool = mysql.createPool(config.mysql);
router.use(bodyParser.json({
	limit: "2000 kb" //因为做博客的时候,传的参数会比较大,不设置的话,会因为参数体过大报错
}));
router.use(bodyParser.urlencoded({
	parameterLimit: 1000,
	limit: '50mb',
	extended: false
}));
module.exports = pool;